﻿using AutoMapper;
using BCDto.Sim.Admin.Admin;
using BCDto.Sim.Admin.AdminOperationRecord;
using BCDto.Sim.Admin.TreePermission;
using BCEntity.Sim.Admin.Admin;
using BCEntity.Sim.Admin.AdminOperationRecord;
using BCEntity.Sim.Admin.TreePermission;

namespace BCService.MapperProfiles.Sim.Admin.TreePermission
{
    /// <summary>
    /// 树形权限
    /// </summary>
    public class TreePermissionProfile : Profile
    {
        public TreePermissionProfile()
        {
            CreateMap<TreePermissionRecordEntity, TreePermissionRecordDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<TreePermissionRecordDto, TreePermissionRecordEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<TreePermissionConfigEntity, TreePermissionConfigDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<TreePermissionConfigDto, TreePermissionConfigEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();

            CreateMap<TreePermissionConfigEntity, TreePermissionRecordViewEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<TreePermissionRecordViewEntity, TreePermissionRecordViewDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<TreePermissionConfigRequestDto, TreePermissionConfigEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();

            CreateMap<TreePermissionRecordViewEntity, TreePermissionConfigDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<TreePermissionRecordViewEntity, TreePermissionRecordDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
        }
    }
}
